<template>
  <a-card :bordered="false">
    <f-search-form @searchHandler="searchHandler">
      <f-search-form-item label="专业包代码" name="majorCode"/>
      <f-search-form-item label="工程包代码" name="packageNo"/>
    </f-search-form>
    <f-table ref="table" size="default" rowKey="userId" :operator="operator" :columns="columns" :multiple="false"  :params="queryParam" :api="api.material" :scroll="{ x: 1500, y: 500 }">
<!--      <span slot="action" slot-scope="text, record">-->
<!--          <template>-->
<!--            <a @click="$refs.materbmpDrawer.showDrawer(record)">编辑</a>-->
<!--            <a-divider type="vertical"/>-->
<!--          </template>-->
<!--          <a-dropdown>-->
<!--            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>-->
<!--            <a-menu slot="overlay">-->
<!--              <a-menu-item v-if="$auth('table.delete')">-->
<!--                <a href="javascript:;" @click="$refs.table.del(record)">删除</a>-->
<!--              </a-menu-item>-->
<!--            </a-menu>-->
<!--          </a-dropdown>-->
<!--        </span>-->
    </f-table>
  </a-card>
</template>

<script>
  import api from './js/api'
  export default {
    components: {
    },
    props: {
      versionId: {
        type: String,
        default: ''
      }
    },
    data() {
      let me = this
      return {
        projectIds:{},
        api:  Object.assign(api, this.api),
        tableId: 'appUser',
        //列表初始化查询参数
        queryParam: { },
        // 表头
        columns: [
          {
            title: '专业名称',
            align: 'center',
            dataIndex: 'majorName',
            width: 100,
            fixed: 'left'
          },
          {
            title: '专业代码',
            align: 'center',
            dataIndex: 'majorCode',
            width: 100,
            fixed: 'left'
          },
          {
            title: '工程包名称',
            align: 'center',
            dataIndex: 'packageName',
            width: 100
          },
          {
            title: '工程包代码',
            align: 'center',
            dataIndex: 'packageNo',
            width: 100
          },
          {
            title: '材料WBS代码',
            align: 'center',
            dataIndex: 'materialWbsCode',
            width: 100
          },
          {
            title: '全物料代码',
            align: 'center',
            dataIndex: 'materialCode',
            width: 150
          },
          {
            title: '设备、材料名称',
            align: 'center',
            dataIndex: 'materialName',
            width: 150
          },
          // {
          //   title: '型号/规格',
          //   align: 'center',
          //   dataIndex: 'materiaSpecs',
          //   width: 150
          // },
          {
            title: '项目名称',
            align: 'center',
            dataIndex: 'materiaSpecs',
            width: 150
          },
          {
            title: '材料项目描述',
            align: 'center',
            dataIndex: 'materialDesc',
            width: 150
          },
          {
            title: '技术参数或技术说明',
            align: 'center',
            dataIndex: 'technicalData',
            width: 150
          },
          {
            title: '服务代码',
            align: 'center',
            dataIndex: 'serviceCode',
            width: 100
          },
          {
            title: '服务WBS代码',
            align: 'center',
            dataIndex: 'serviceWbsCode',
            width: 100
          },
          {
            title: '科目名称',
            align: 'center',
            dataIndex: 'subjectName',
            width: 100
          },
          {
            title: '层级号',
            align: 'center',
            dataIndex: 'levelNo',
            width: 100
          },
          {
            title: '材料项目描述',
            align: 'center',
            dataIndex: 'materialDesc',
            width: 150
          },
          {
            title: '分区域',
            align: 'center',
            dataIndex: 'materialArea',
            width: 150
          },
          {
            title: '分系统',
            align: 'center',
            dataIndex: 'materialUse',
            width: 150
          },
          {
            title: '100成本工程量',
            align: 'center',
            dataIndex: 'costQuantity100',
            width: 150
          },
          {
            title: '200成本工程量',
            align: 'center',
            dataIndex: 'costQuantity200',
            width: 150
          },

          {
            title: '标前工程量',
            align: 'center',
            dataIndex: 'beforeMarkQuantity',
            width: 150
          },
          {
            title: '合同清单工程量',
            align: 'center',
            dataIndex: 'contractBillQuantity',
            width: 150
          },
          {
            title: '损耗',
            align: 'center',
            dataIndex: 'loss',
            width: 150
          },
          {
            title: '计量单位',
            align: 'center',
            dataIndex: 'measurementUnit',
            width: 150
          },
          {
            title: '主材价',
            align: 'center',
            dataIndex: 'mainPrice',
            width: 150
          },
          {
            title: '主材费',
            align: 'center',
            dataIndex: 'mainAmount',
            width: 150
          },
          {
            title: '安装费',
            align: 'center',
            dataIndex: 'installAmount',
            width: 150
          },
          {
            title: '有合同综合单价',
            align: 'center',
            dataIndex: 'contractSyntheticalPrice1',
            width: 100
          },
          {
            title: '拟合同综合单价',
            align: 'center',
            dataIndex: 'contractSyntheticalPrice2',
            width: 100
          },
          {
            title: '合同综合单价',
            align: 'center',
            dataIndex: 'contractSyntheticalPrice3',
            width: 100
          }
        ],
        operator: [
        ]
      }
    },
    created() {
      this.queryParam.versionId=this.versionId
    },
    methods: {
      searchHandler(params) {
        this.$refs.table.refresh(true, params)
      }
    }
  }
</script>
<style scoped>

</style>